<template>
  <div class="wrapper">
    <swiper :options="swiperOption">
    <!-- 轮播图 -->
    <swiper-slide v-for="item of swiperList" :key="item.id">
       <img class="swiper-img" :src="item.imgUrl">
    </swiper-slide>
    <!-- 可选控件 -->
    <div class="swiper-pagination"  slot="pagination"></div>
  </swiper>
  </div>
</template>

<script>
export default {
  name: 'homeSwiper',
  props:{
     swiperList:Array
  },
  data () {
    return {
        // swiperList:
        // [
        //   {
        //    id:'001',
        //    imgUrl:'https://pages.c-ctrip.com/hotel/201909/shuidengjie/pces.jpg'
        //   },
        //   {
        //    id:'002',
        //    imgUrl:'https://pages.c-ctrip.com/hotel/201909/guoqingcuofeng/cuofengyoupc.jpg'
        //   },
        //   {
        //    id:'003',
        //    imgUrl:'https://pages.c-ctrip.com/hotel/201908/fengyeji/fengyejiPC.jpg'
        //   }
        // ],
        swiperOption:{
            pagination:'.swiper-pagination',
            loop:true //循环显示,
        }
    }
  }
}
</script>

<style lang="stylus" scoped>
     .wrapper >>> .swiper-pagination-bullet
        background :#fff
     .swiper-img
        width :100%
        height :2.6rem
</style>